##import os
##os.system("start https://www.lanqiao.cn/problems/3422/learning/");


def solve(s):
    s = "0" + hex(s)[2 : 4]
    return s.upper()[-2 : ]


r, g, b = map(int, input().split())

print("#",  solve(r), solve(g), solve(b), sep='')
